﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user',
        routes: [
          { name: '登录', path: '/user/login', component: './user/Login' },
          { name: '注册', path: '/user/register', component: './user/Register' },
        ],
      },
      { component: './404' },
    ],
  },
  { path: '/welcome', name: '上传代码', icon: 'smile', component: './Welcome' },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    component: './Admin',
    routes: [
      {
        path: '/admin/user-manage',
        name: '用户管理',
        icon: 'smile',
        component: './Admin/UserManage',
      },
      { component: './404' },
    ],
  },
  { name: '查询历史记录', icon: 'table', path: '/list', component: './TableList' },
  // 新增代码对比路由
  {
    path: '/code-comparison',
    name: '代码对比',
    hideInMenu: true, // 不在菜单中显示，可通过点击跳转访问
    component: './CodeComparison', // 指向您的代码对比页面
  },
  {
    path: '/account/settings',
    name: '个人设置',
    hideInMenu: true, // 不在菜单中显示，可通过点击跳转访问
    component: './user/Settings', // 指向您的代码对比页面
  },
  { path: '/', redirect: '/welcome' },
  { component: './404' },
];
